/**
 * Created by CodeTlan.
 * User: Ing. Miguel Salas
 * Date: 3/19/12
 * Time: 2:44 AM
 */
Ext.define('CT.view.trabajador.Form', {
    extend:'Ctc.view.Form',
    requires: [
        'CT.view.delegado.Combo',
        'CT.view.secretario.Combo'
    ],
    alias:"widget.formtrabajador",
    buildItems:function(){
        return [{
            fieldLabel: 'Ficha',
            enforceMaxLength: true,
            maxLength: 6,
            minLength: 6,
            vtype: 'num',
            name: 'ficha'
        },{
            fieldLabel: 'Nombre',
            vtype: 'textspace',
            name: 'nombre'
        },{
            fieldLabel: 'Apellidos',
            vtype: 'textspace',
            name: 'apellidos'
        },{
            fieldLabel: 'Delegado',
            xtype: 'combodelegados',
            name: 'delegado_k'
        },{
            fieldLabel: 'Secretario',
            xtype: 'combosecretarios',
            name: 'secretario_k'
        }];
    },
    buildButtons:function(){
        return [{
            text: 'Cancelar',
            handler: function() {
                this.up('form').getForm().reset();
            }
        }, {
            text: 'Enviar',
            formBind: true,
            disabled: true,
            action: 'add'
        }];
    }
});